//--------------------------------------------------------------------------------------
// Constant Buffer Variables
//--------------------------------------------------------------------------------------
Texture2D txDiffuse : register( t0 );
SamplerState samLinear : register( s0 );

cbuffer cbNeverChanges : register( b0 )
{
    matrix world;
    matrix view;
    matrix projection;
    float4 color;
};
/*
cbuffer cbChangeOnResize : register( b1 )
{
    matrix Projection;
};

cbuffer cbChangesEveryFrame : register( b2 )
{
    matrix World;
    float4 vMeshColor;
};
*/

//--------------------------------------------------------------------------------------
struct VS_INPUT
{
    float3 Pos : POSITION;    
};

struct PS_INPUT
{
    float4 Pos : SV_POSITION;    
};


//--------------------------------------------------------------------------------------
// Vertex Shader
//--------------------------------------------------------------------------------------
PS_INPUT VS( VS_INPUT input )
{
    PS_INPUT output = (PS_INPUT)0;
	output.Pos = mul( world, float4(input.Pos,1.0f) );
    output.Pos = mul( view, output.Pos );
    output.Pos = mul( projection, output.Pos );
    
	/*
	output.Pos = mul( float4(input.Pos,1.0f), world );
    output.Pos = mul( output.Pos, view );
    output.Pos = mul( output.Pos, projection );
	*/
        
    return output;
}


//--------------------------------------------------------------------------------------
// Pixel Shader
//--------------------------------------------------------------------------------------
float4 PS( PS_INPUT input) : SV_Target
{
    return color;
}
